Curve-fitting compaction